<?php
/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4 foldmethod=marker: */
// +---------------------------------------------------------------------------
// | SWAN [ $_SWANBR_SLOGAN_$ ]
// +---------------------------------------------------------------------------
// | Copyright $_SWANBR_COPYRIGHT_$
// +---------------------------------------------------------------------------
// | Version  $_SWANBR_VERSION_$
// +---------------------------------------------------------------------------
// | Licensed ( $_SWANBR_LICENSED_URL_$ )
// +---------------------------------------------------------------------------
// | $_SWANBR_WEB_DOMAIN_$
// +---------------------------------------------------------------------------
 
/**
+------------------------------------------------------------------------------
* XML类example
+------------------------------------------------------------------------------
* 
* @package sw_xml
* @version $_SWANBR_VERSION_$
* @copyright $_SWANBR_COPYRIGHT_$
* @author $_SWANBR_AUTHOR_$ 
+------------------------------------------------------------------------------
*/

require_once 'core.php';

require_once PATH_SWAN_LIB . 'sw_xml.class.php';

/*
+------------------------------------------------------------------
 * {{{ xml2array XML文件转化为数组
+------------------------------------------------------------------
*/


$xml2array = sw_xml::factory('xml2array');

$xml2array->set_filename('../../database/db_schema.xml');
$arr = $xml2array->xml2array();

file_put_contents('a.txt', var_export($arr, true));
/* }}}
+------------------------------------------------------------------
 * {{{ output_xml 创建一个XML文件
+------------------------------------------------------------------
*/

//$create_xml = sw_xml::factory('output_xml');
//$create_xml->set_filename('output_test.xml');
//var_dump($create_xml->output_xml($arr));
/* }}}
+------------------------------------------------------------------
 * 
+------------------------------------------------------------------
*/


